package com.orange.handler.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.orange.handler.AuthSchoolRunningDateService;
import com.orange.modules.dao.AuthSchoolRunningDataRepository;
import com.orange.modules.entity.AuthSchoolRunningMap;
import com.orange.modules.entity.school_data.AuthSchoolRunningData;


@Service
public class AuthSchoolRunningDateServiceImpl implements AuthSchoolRunningDateService{

	@Autowired
	private AuthSchoolRunningDataRepository authSchoolRunningDataRepository;

	//保存数据
	@Override
	public void insertAuthSchoolRunningData(AuthSchoolRunningData ard) throws SQLException {
		authSchoolRunningDataRepository.insertAuthSchoolRunningData(ard);
	}
	
	//删除
	@Override
	public void delAuthSchoolRunningData(String pid) throws SQLException{
		authSchoolRunningDataRepository.delAuthSchoolRunningData(pid);
	}

	//根据ID查找
	@Override
	public AuthSchoolRunningData queryAuthSchoolRunningDataById(String pid) throws SQLException{
		AuthSchoolRunningData as = authSchoolRunningDataRepository.queryAuthSchoolRunningDataById(pid);
		return as;
	}

	
	//查看所有
	@Override
	public List<AuthSchoolRunningData> queryAuthSchoolRunningDataByAll() throws SQLException {
		List<AuthSchoolRunningData> as = authSchoolRunningDataRepository.queryAuthSchoolRunningDataByAll();
		return as;
	}
	
	
	
	
	
	
	
	
	
	
	
	
	

	@Override
	public void insertRunningMap(AuthSchoolRunningMap asrm) throws SQLException {
		authSchoolRunningDataRepository.insertRunningMap(asrm);
		
	}

	@Override
	public AuthSchoolRunningData queryAuthSchoolRunningDataBySchoolId(
			String schoolId, String loginType) throws SQLException {
		AuthSchoolRunningData as = authSchoolRunningDataRepository.queryAuthSchoolRunningDataBySchoolId(schoolId, loginType);
		return as;
	}

	@Override
	public List<AuthSchoolRunningMap> queryAuthSchoolRunningMapByItemId(
			String rdId) throws SQLException {
		List<AuthSchoolRunningMap> as = authSchoolRunningDataRepository.queryAuthSchoolRunningMapByItemId(rdId);
		return as;
	}

	@Override
	public void deleteRunningMap(String srId) throws SQLException {
		authSchoolRunningDataRepository.delAuthSchoolRunningData(srId);
		
	}

	@Override
	public void deleteAuthSchoolRunningMapBySRId(String runningDataId)
			throws SQLException {
		authSchoolRunningDataRepository.deleteAuthSchoolRunningMapBySRId(runningDataId);
	}

	


	


}
